//
//  BaseNavigationController.m
//  Example
//
//  Created by Andney Jack on 2020/6/2.
//  Copyright © 2020 annidy. All rights reserved.
//

#import "BaseNavigationController.h"
#import "Util.h"

@interface BaseNavigationController ()

@end

@implementation BaseNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    if (self.allowRotate) {
        return [self.topViewController supportedInterfaceOrientations];
    } else {
        return [Util ct_supportedInterfaceOrientationsForVC:self];
    }
}

- (BOOL)shouldAutorotate {
    if (self.allowRotate) {
        return YES;
    } else {
        return [Util ct_shouldAutorotateForVC:self];
    }
}

@end
